
describe('App.HaveAccount', function() {
    it('_currentBalanceDisplay with equal localCurrentBalance and currentBalance', function() {
        var t_localCurrentBalance = 1024.00,
            t_currentBalance = 1024.00,
            t_label = 'Current Balance';
        var account = App.HaveAccount.create({
            "currentBalance": t_currentBalance,
            "localCurrentBalance": t_localCurrentBalance,
            "currencyCode": "INR"
        });

        var expectedOutput = {
            key:t_label,
                value:{currencyCode:"INR", amount:t_currentBalance},
                isAmount : true,
                isNegative: false
        };

        expect(JSON.stringify(account._currentBalanceDisplay(t_label))).toEqual(JSON.stringify(expectedOutput));
    });

    it('_currentBalanceDisplay with different localCurrentBalance and currentBalance', function() {
        var t_localCurrentBalance = 1024.00,
            t_currentBalance = 2024.00,
            t_label = 'Current Balance';
        var account = App.HaveAccount.create({
            "currentBalance": t_currentBalance,
            "localCurrentBalance": t_localCurrentBalance,
            "currencyCode": "INR"
        });

        var expectedOutput = {
            key:t_label,
            value:{currencyCode1:"INR", amount1:t_currentBalance, currencyCode2:"INR", amount2:t_localCurrentBalance},
            is2Amount : true,
            isNegative: false
        };

        expect(JSON.stringify(account._currentBalanceDisplay(t_label))).toEqual(JSON.stringify(expectedOutput));
    });
});